package com.ucode.application.vo.acis;

import com.ucode.acis.mode.Bibliography;
import com.ucode.oss.model.FileInfo;

@SuppressWarnings("serial")
public class BibliographyVo extends Bibliography{

    private String coverUrl;
    
    private String coverName;
    
    public BibliographyVo(Bibliography bibliography,FileInfo coverFile){
        if(bibliography != null){
            this.setId(bibliography.getId());
            this.setCreatedTime(bibliography.getCreatedTime());
            this.setUpdatedTime(bibliography.getUpdatedTime());
            this.setDeltag(bibliography.getDeltag());
            this.setName(bibliography.getName());
            this.setType(bibliography.getType());
            this.setCoverId(bibliography.getCoverId());
            this.setSummary(bibliography.getSummary());
            this.setIntro(bibliography.getIntro());
            this.setSort(bibliography.getSort());
        }
        if(coverFile != null){
            this.setCoverUrl(coverFile.getUrlprefix()+coverFile.getFilePath());
            this.setCoverName(coverFile.getSourceName());
        }
    }

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    public String getCoverName() {
        return coverName;
    }

    public void setCoverName(String coverName) {
        this.coverName = coverName;
    }
    
}
